{include file="header.htm" /}

<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;min-width:400px;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page" style="box-shadow:none;min-width: 400px;">
    <div class="flexigrid flexigrid-xin">
        <div class="header-bar">
            <div class="more">
                <div class="search">
                    <div class="content">
                        <form id="searchForm" action="{:weapp_url('Verify/Verify/select_users')}" method="get" onsubmit="layer_loading('正在处理');" style="display: unset;">
                            {$searchform.hidden|default=''}
                            <div class="ey-form-item">
                                <label class="users-form-item-label">关键词：</label>
                                <div class="users-form-item-content">
                                    <div class="users-select">
                                        <div tabindex="0" class="users-select-selection">
                                            <div class="sDiv2">
                                                <input type="text" size="50" name="keywords" value="{$Request.param.keywords}" class="qsbox" style="width: 170px;" placeholder="用户名">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="ey-form-item" style="margin-left: 20px;">
                                <div class="users-form-item-content">
                                    <span class="bt-xin" onclick="usersQuery();">查询</span>
                                    <span class="bt-xin-no" onclick="usersQuery('reset');">重置</span>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="geduan-xin"></div>
        <div class="hDiv">
            <div class="hDivBox">
                <table cellspacing="0" cellpadding="0" style="width: 100%">
                    <thead>
                        <tr>
                            <th abbr="article_time" axis="col6" class="w50"> <div class="tc">ID</div> </th>
                            <th abbr="article_time" axis="col6"> <div style="text-align: left; padding-left: 10px;">用户名</div> </th>
                            <th abbr="article_time" axis="col6" class="w50"> <div class="tc">操作</div> </th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="bDiv" style="height: auto;">
            <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                <table style="width: 100%;">
                    <tbody>
                    {empty name="list"}
                        <tr>
                            <td class="no-data" align="center" axis="col0" colspan="50">
                                <div class="no_row">
                                    <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
                                </div>
                            </td>
                        </tr>
                    {else/}
                        {foreach name="list" item="vo" key="k" }
                        <tr>
                            <td class="sort">
                                <div class="tc w50"> {$vo.users_id} </div>
                            </td>
                            <td class="" style="width: 100%;">
                                <div class="pl10 text-l10 tl">
                                    <img id="img_head_pic" class="fl" style="width: 40px; height: 40px;" src="{$vo.head_pic|get_head_pic=###}">
                                    <p style="margin-top: 5px;">{$vo.nickname}</p>
                                </div>
                            </td>
                            <td class="operation">
                                <div class="w50 tc">
                                    <a href="javascript:void(0);" onclick="usersSelect(this);" data-id="{$vo.users_id}" data-nickname="{$vo.nickname}" data-litpic="{$vo.head_pic|get_default_pic=###}" id="users_{$vo.users_id}" class="btn blue">选择</a>
                                </div>
                            </td>
                        </tr>
                        {/foreach}
                    {/empty}
                    </tbody>
                </table>
            </div>
            <div class="iDiv" style="display: none;"></div>
        </div>
        <!--分页位置-->
        {$pageStr}
    </div>
</div>
<script type="text/javascript">
    // 设置已选
    var users_id = $('#users_id', window.parent.document).val();
    if (users_id) $('#users_' + users_id).css('color', 'red').html('已选');

    // 订单查询
    function usersQuery(isReset) {
        if (isReset && 'reset' == isReset) {
            window.location.href = "{:weapp_url('Verify/Verify/select_users')}";
        } else {
            $('#searchForm').submit();
        }
    }

    function usersSelect(obj) {
        var users_id = $(obj).attr('data-id');
        var litpic = $(obj).attr('data-litpic');
        var nickname = $(obj).attr('data-nickname');
        var usersHtml = '<img style="float: unset; border: 1px solid #e9edef; width: 24px; height: 24px; border-radius: 50%;" src="' + litpic + '"> &nbsp; <a href="javascript:void(0);" data-href="{:url(\'Member/users_edit\', [\'id\'=>'+users_id+'])}" onclick="openFullframe(this, \'会员资料\', \'100%\', \'100%\');" class="mr20">' + nickname + '</a>';
        $('#users_id', window.parent.document).val(users_id);
        $('#userInfo', window.parent.document).show().html(usersHtml);
        parent.layer.closeAll();
    }
</script>

{include file="footer.htm" /}